import axios from "axios";

const durationTime = 5 * 1000;

const baseURL = "/api";

let request = axios.create({
  baseURL,
  timeout: durationTime,
  withCredentials: true,
});

request.interceptors.request.use(
  (config) => {
    // config.headers["Authorization"] =
    //   "_funi_lap=; FUNI_JSESSIONID=1619058707459-5A4A27A5619B96F7ACAAFF; _funi_tk=4938E7D54FA419058B25BBF00E897427754843DE1E8CB298356EC4D5C4CB74FE6E0B12B9B1AF5BF23912CD09FB96C7A77675A522F426C5FE55800C9DFFA857C4907909097511B6B32BEC75D28352C098";
    return config;
  },
  (error) => {
    return Promise.reject(error);
  }
);

export default request;
